package com.manner.groupon.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Builder;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;


/**
 * 商家账面流水表
 * @TableName tb_store_account_flow
 */
@TableName(value ="tb_store_account_flow")
@Data
@Builder
public class StoreAccountFlow extends Object implements Serializable {
    /**
     * 主键自增，数据唯一标识
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 流水编号
     */
    @TableField(value = "store_flow_id")
    private String storeFlowId;

    /**
     * 外键用户编号
     */
    @TableField(value = "user_id")
    private Long userId;


    /**
     * 外键商户订单编号
     */
    @TableField(value = "groupon_order_id")
    private String grouponOrderId;

    /**
     * 单笔流水金额
     */
    @TableField(value = "amount")
    private BigDecimal amount;

    /**
     * 余额
     */
    @TableField(value = "balance")
    private BigDecimal balance;

    @TableField(value = "title")
    private String title;

    @TableField(value = "is_add")
    private int isAdd;

    /**
     * 付款方式
     */
    @TableField(value = "pay_method")
    private String payMethod;

    /**
     * 流水记录是否生效(0.不生效 1.生效)
     */
    @TableField(value = "is_delete")
    private Integer isDelete;

    /**
     * 下单支付时间
     */
    @TableField(value = "create_time")
    private String createTime;

    /**
     * 更新流水记录时间
     */
    @TableField(value = "update_time")
    private String updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}